package com.lianyu507.controller;

import com.lianyu507.service.TranslateService;
import com.lianyu507.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TranslateController {
    @Autowired
    private TranslateService translateService;

    @RequestMapping("/translate")
    @ResponseBody
    public JSONResult addTranslate(Integer articleId) {
        return translateService.translate(articleId, null);
    }

}
